#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<string.h>
#include<assert.h>
char* my_strncpy(char*destination,const char*source,size_t num) {
	assert(destination);
	assert(source);
	char* p = destination;
	while (num) {
		*destination++ = *source++;
		num--;
	}
	return p;
}
int main()
{
	char arr1[20] = "hello";
	char arr2[20] = "pe";
	int n = 15;
	printf("%s\n", strncpy(arr1, arr2, n));
	printf("%s\n", my_strncpy(arr1, arr2, n));
	return 0;
}